<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
        <link rel="shortcut icon" href="images/content/favicon.ico" />
        <meta http-equiv="Content-Script-Type" content="text/javascript" /> 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="robots" content="index, follow" />
        <meta name="keywords" content="" />
        <meta name="title" content="" />
        <meta name="description" content="" />
        <title>Cleanex</title>
        <link rel="shortcut icon" href="images/favicon.ico" />
        <!-- ////////////////////////////////// -->
        <!-- //      Start Stylesheets       // -->
        <!-- ////////////////////////////////// -->
        <link href="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/styles/style.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/styles/color.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/styles/inner.css" rel="stylesheet" type="text/css" />
        <!-- ////////////////////////////////// -->
        <!-- //      Javascript Files        // -->
        <!-- ////////////////////////////////// -->
        <?php 
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery-1.6.4.min.js") ;
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/cufon-yui.js") ;
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/Yanone_Kaffeesatz_Regular_5F400-Yanone_Kaffeesatz_Bold_700.font.js") ;
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/Brush_Script_Std_italic_500.font.js") ;
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jqueryslidemenu.js") ;
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery.cookie.js") ;
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/colorpicker.js") ;
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/switcher.js") ;
        
        ?>
        <script type="text/javascript">
            Cufon.replace ('h1, h2, h3, h4, h5, .title, h6:not(.clean)', {fontFamily: 'Yanone Kaffeesatz Regular'});
            Cufon.replace('#logo h1, h6:not(.clean)', {fontFamily: 'Brush Script Std'});
        </script>
        <script type="text/javascript">
            jQuery(document).ready(function(){
                //Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs):
//                var arrowimages={down:['downarrowclass', 'themes/Cleanex/views/layouts/images/down.gif', 15], right:['rightarrowclass', 'themes/Cleanex/views/layouts/images/right.gif']}
                var arrowimages={down:['downarrowclass', '<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/images/down.gif', 15], right:['rightarrowclass', 'themes/Cleanex/views/layouts/images/right.gif']}
            });
        </script>
    
        <!--Demo Switcher-->
        <link id="skinscss" href="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/styles/skins/light.css" rel="stylesheet" type="text/css" />
    
        <link href="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/styles/colorpicker.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/styles/style-switcher.css" rel="stylesheet" type="text/css" />
    </head>
    <body>

        <div id="wrapper">
            <div id="container">
                <div id="top">
                    <div id="logo">
                        <h1><a href="#">2C09 PJM Project<span class="dot">...</span></a></h1>
                        <span class="desc">Online Bookshop</span>
                    </div><!-- end #logo -->
                    <div class="information">
                        For additional information email us at: <span class="no-phone"><a href="mailto:testmail@templatesquare.com">hanu2c09@rocketmail.com</a></span>
                    </div>
                </div><!-- end #top -->

                <div id="topnav">
                    <div id="myslidemenu" class="jqueryslidemenu">
                        <ul>
                            <li><?php echo CHtml::link("Home", array('site/index')); ?></li> 
                            <li><a href="#">Genres</a>
                                <ul>
                                    <?php  
                                        $allCats = ProductCategory::model()->getAllCategories();
                                    foreach ($allCats as $key => $value):?>
                                    <li>
                                        <?php echo CHtml::link($value, array("site/bookbycategory", "catId"=>$key)); ?>
                                        <ul>
                                            <?php 
                                                $allMov = ProductCategory::model()->findByPk($key)->getAllProductsAssociated();
                                                 foreach ($allMov as $mov):?>
                                                    <li>
                                                    <?php echo CHtml::link($mov->name, array("site/book", "id"=>$mov->productId)); ?>
                                                    </li>
                                                <?php endforeach; ?>
                                        </ul>
                                    </li>
                                    <?php endforeach; ?>
                                </ul>
                            </li> 
                            <?php
                                if (!Yii::app()->user->isGuest) {
                                    echo "<li>" . CHtml::link("View Cart", array("/site/viewcart")) . "</li>";
                                    echo "<li>" . CHtml::link("Profile", array("/site/updateuser", "uid" => Yii::app()->user->id)) . "</li>";
                                    echo "<li>" . CHtml::link("Logout(" . Yii::app()->user->name . ")", array('/site/logout')) . "</li>";
                                } else {
                                    echo "<li>" . CHtml::link("Login", array("/site/login")) . "</li>";
                                    echo "<li>" . CHtml::link("Register", array("/site/createuser")) . "</li>";
                                }
                            ?>  
                        </ul>
                    </div>
                </div><!-- end #topnav -->


                <div id="header">
<!--			<img src="images/header-pic3.jpg" alt="" />-->
        <?php echo CHtml::image(Yii::app()->theme->baseUrl . "/views/layouts/images/books.png", "") ?>
                    <div class="header-desc">
                        <h1>Hanu</h1>
                        <h4>2C09</h4>
                        <p>Developed by:<br /> Tran Anh Duc<br/>Nguyen Thi Tho<br/>Le Manh Tuong<br/>Dang Van Nghia</p>
                    </div>
                </div><!-- end #header -->

                <div id="main-content">
                    <div id="content">           
                        <?php
                        echo $content;
                        ?>
                        <div class="clear"></div><!-- clear float -->

                    </div><!-- end #content -->

                    <div id="sidebar">
                        <ul>
                            <li class="widget-container">
                                <h2>Genres</h2>
                                <ul>
                                    <?php
                                    $allCats = ProductCategory::model()->getAllCategories();

                                    foreach ($allCats as $key => $value) {
                                        echo "<li>" . CHtml::link( $value , array('site/bookbycategory', 'catId' => $key)) . "</li>";
                                    }
                                    ?>
                                </ul>
                            </li>
                        </ul>
                    </div><!-- #sidebar -->
                    <div class="clear"></div><!-- clear float left -->
                </div><!-- end #main-content -->

                <div id="frame-footer">
                    <div id="footer">
                        <div id="copyright">
                            Copyright &copy;2011 Duc Tran. All rights reserved.
                        </div><!-- end #copyright -->
                        <ul class="social">
                            <li id="social1"><a href="#">Twitter</a></li>
                            <li id="social2"><a href="#">Youtube</a></li>
                            <li id="social3"><a href="#">Facebook</a></li>
                            <li id="social4"><a href="#">Flickr</a></li>
                        </ul>
                    </div><!-- end #footer -->
                </div><!-- end #frame-footer -->
                <div class="clear"></div><!-- end clear float -->
            </div><!-- end #container -->	
        </div><!-- end #wrapper -->	
        <script type="text/javascript"> Cufon.now(); </script> <!-- to fix cufon problems in IE browser -->

    </body>
</html>
